<template>
  <div>
    <div id="div_title">
      <span id="title"><b>订单详情-待支付</b></span>

      <el-button type="primary"
                 id="back"
                 @click="back()">返回</el-button>
    </div>
    <PrescriptionUserMessage :prescription="prescription"></PrescriptionUserMessage>
    <PrescriptionMessage :prescription="prescription"></PrescriptionMessage>
    <PrescriptionOrderMessage :prescriptionOrder="prescriptionOrder"></PrescriptionOrderMessage>
  </div>
</template>

<script>
import PrescriptionUserMessage from "../prescription/PrescriptionUserMessage.vue"
import PrescriptionMessage from "../prescription/PrescriptionMessage.vue"
import PrescriptionOrderMessage from "./PrescriptionOrderMessage.vue"
export default {
  name: "PrescriptionOrderDetail",
  components: {
    PrescriptionUserMessage,
    PrescriptionMessage,
    PrescriptionOrderMessage
  },
  data () {
    let json = window.sessionStorage.getItem("prescriptionOrder");
    let prescriptionOrder = window.JSON.parse(json);
    return {
      prescriptionOrder: prescriptionOrder,
      prescription: prescriptionOrder.prescription,
    }
  },
  methods: {
    back: function () {
      this.$router.push("/index/prescriptionOrder")
    }
  }
}
</script>

<style scoped>
#title {
  font-size: 30px;
}
#div_title {
  /* border: 1px solid rgb(216, 216, 216); */
  margin-right: 200px;
}
#back {
  float: right;
  line-height: initial;
}
</style>
